package br.ufrj.dcc.tp.ns.types;

public enum PacketEventType {
	RECEIVE('r'), ENQUEUE('+'), DEQUEUE('-'), DROP('d'), HOP('h');
	
	private char valor;
	
	PacketEventType(char valor) {
		this.valor = valor;
	}
	
	public static PacketEventType get(char c) {
		for(PacketEventType e : PacketEventType.values()) {
			if(e.getValor() == c) {
				return e;
			}
		}
		
		return null;
	}
	
	public char getValor() {
		return valor;
	}
}
